The present invention relates to a motor control system that controls a motor by a numerical control device, and more specifically, to a motor control system that controls a plurality of motors by one numerical control device (hereinafter, also referred to as CNC device).
FIG. 1 is a block diagram showing a configuration of motor control by a conventional numerical control device. As shown in FIG. 1, a numerical control device 11 has a main processor 12, a DSP (Digital Signal Processor) 13, and a driver 14. Main processor 12 calculates a positional instruction or velocity instruction for specifying the (rotation) position of a motor 15 to be controlled and outputs it to DSP 13. DSP 13 calculates a current value necessary to drive motor 15 from the given positional instruction or velocity instruction and the positional information of the motor to be transmitted from a pulse coder 16 attached to motor 15 and outputs it to driver 14 as a PWM (Pulse Width Modulation) signal. Driver 14 generates and outputs a current signal to actually drive motor 15 based on the transmitted PWM signal and at the same time, measures a current that has flown through the motor and returns it to DSP 13. DSP 13 controls the PWM signal so that the current valve will be exactly the same as that calculated. In addition, when new positional information is sent from pulse coder 16, DSP 13 calculates and outputs a new current value and PWM signal and continues outputting the current until the motor rotates to the position specified by the positional instruction.
It is possible to integrate the hardware of numerical control device comprising main processor 12, DSP 13, and driver 14 into a single unit. However, when there are two or more motors to be controlled, or when there are two or more types of motor to be controlled, it is necessary to prepare units in a number corresponding to the number of combinations. Generally, in a numerical control device for a working machine, parts relating to the drive of the motor are separated from the numerical control device. In other words, the numerical control device in a narrow meaning that mounts a main processor is separated from a plurality of amplifiers in a number corresponding to the number and kinds of motors, and the numerical control device and the amplifiers are coupled via serial communication. The configuration of these are described in, for example, Japanese Unexamined Patent Publication (Kokai) No. H9-69004 and Japanese Unexamined Paten Publication (Kokai) No. 2002-120128 (U.S. Pat. No. 5,940,292A1 and U.S. Pat. No. 6,566,836B2).
When the amplifiers are separated, it is determined whether the mounting position of DSP is on the side of the numerical control device or the side of the amplifier by considering both advantages and disadvantages relating to the individual costs, functions, and specifications. There may be a case where one single numerical control device is used in both of the configurations. Refer to Japanese Unexamined Patent Publication (Kokai) No. H9-69004 and Japanese Unexamined Patent Publication (Kokai) No. 2002-120128.
For example, there is an advantage of providing a DSP on the side of the control device that a large amount of data to be used in an adjustment tool etc., of a motor can be processed by a main processor even in a multi spindle system in which the main processor and the plurality of DSPs are connected via a high-speed bus on the numerical control device so as to transmit a large amount of data in a predetermined period of time.
On the other hand, for example, there is an advantage of providing a DSP on the side of the amplifier that it is made possible to stop the motor while controlling it even if it is made impossible to control the motor due to trouble in the numerical control device because the DSP is on the side of the amplifier.
FIG. 2 is a block diagram showing a configuration in which an amplifier without a DSP and an amplifier with a DSP are controlled by a single numerical control device. An amplifier 28 that controls a motor 30 has only a driver 29 and no DSP is provided. An amplifier 32 that controls a motor 35 has a DSP 33 and a driver 34. A numerical control device 20 has a main processor 21, a DSP 22, a transmission buffer 23, a serial bus control circuit 24, a transmission buffer 25, and a serial bus control circuit 26. Serial bus control circuit 24 and amplifier 28 are connected via a serial bus 27 and serial bus control circuit 26 and amplifier 32 are connected via a serial bus 31. The positional information detected by the pulse coder of motor 30 is transmitted to DSP 22, the positional information detected by the pulse coder of motor 35 is transmitted to DSP 33 of amplifier 32, and DSP 33 transmits the positional information as is or after processing it to main processor 21. However, as a result, numerical control device 20 has an interface (IF) circuit for receiving the positional information, which is not shown schematically here.
Main processor 21 calculates the positional instruction of two motors 30, 35, outputs the positional instruction of motor 30 to DSP 22, and outputs the positional instruction of motor 35 to transmission buffer 25. DSP 22 calculates a current value necessary to drive motor 30 from the given positional instruction and the positional information of motor 30 and outputs it to transmission buffer 23 as a PWM (Pulse Width Modulation) signal. Serial bus control circuit 24 outputs the PWM signal retained in transmission buffer 23 to serial bus 27. Driver 29 within amplifier 28 generates and outputs a current signal of motor 30 based on the transmitted PWM signal. Although not shown schematically, when it is necessary to return the current value of the current that has flown through the motor detected by driver 29 to DSP 13, another communication path is provided separately. However, there may be a case where the positional information detected by the pulse coder is once collected by amplifier 28 and it is transmitted together with the current value to DSP 22. Serial bus control circuit 26 outputs the positional instruction retained in the transmission buffer 25 to serial bus 31. DSP 33 in amplifier 32 calculates a current value necessary to drive motor 35 from the received positional instruction and the positional information of motor 35 and outputs it to driver 34 as a PWM (Pulse Width Modulation) signal. Driver 34 generates and outputs a current signal of motor 35 based on the PWM signal.
Hereinafter, an amplifier that does not have a DSP, receives a PWM signal, and generates a current output to a motor is referred to as a first-type amplifier and an amplifier that has a DSP, receives a positional instruction, and generates a current output to a motor is referred to as a second-type amplifier.
Generally, the amount of data of a PWM signal to be transmitted to a first-type amplifier at one time is smaller than the amount of data of a positional instruction to be transmitted to a second-type amplifier at one time. However, it is necessary to increase the frequency with which the instruction data (PWM signal) is transmitted to the first-type amplifier greater than the frequency with which the instruction data (positional instruction) is transmitted to the second-type amplifier.